//
//    Програма преобразования арабских цифр в римские
////

public class Dec2roman {
    public static void main(String[] args) {
        int[] numbers = new int[] {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1};
        String[] letters = new String[] {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V"," IV","I"};

        int decimalNum = 2013;
        System.out.println("Decimal number: " + decimalNum);

        System.out.print("Roman equivalent: ");
        for (int i = 0; i < 13; i++) {
            while (decimalNum >= numbers[i]) {
                decimalNum -= numbers[i];
                System.out.print(letters[i]);
            }
        }
        System.out.println();
    }
}
